<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="template.xhtml" 
xmlns="http://www.w3.org/1999/xhtml" 
xmlns:comp="http://java.sun.com/jsf/composite/componentes" 
xmlns:t="http://myfaces.apache.org/tomahawk" 
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" 
xmlns:p="http://primefaces.org/ui">

	<ui:define name="coluna_central">

			<div class="well">
				<h:form class="bs-example form-horizontal">
				<h:messages id="messages" showDetail="true"/>
					<fieldset>
						<legend>Cadastro de Cliente</legend>			
					<ul>
					
					<div class="form-group span5">
						<h:outputLabel value="Nome:" />
						<h:inputText id="nomeCliente" value="#{clienteBean.clienteSelecionado.nomeCliente}"  required="true"/>
					</div>
					
					<div class="form-group span5">
						<h:outputLabel value="Email:" />
						<h:inputText id="emailCliente" value="#{clienteBean.clienteSelecionado.emailCliente}"  required="true"/>
					</div>
					
					<div class="form-group span5">
						<h:outputLabel value="Senha:" />
						<h:inputSecret id="senhaCliente" value="#{clienteBean.clienteSelecionado.senhaCliente}" required="true"/>
					</div>
					
					<div class="form-group span5">
						<h:outputLabel value="Repita Senha:" />
						<h:inputSecret id="repitaSenha" value="#{clienteBean.clienteSelecionado.confirmaSenhaCliente}" required="true">
						<f:ajax event="blur" execute="senhaCliente repitaSenha" render="messages" listener="#{clienteBean.validaSenha}"/>
						</h:inputSecret>
					</div>
					
					<div class="form-group span5">
					<h:outputLabel value="Receber e-mails de:" />
					<h:selectOneMenu id="comboCidade" value="#{clienteBean.clienteSelecionado.cidade}" required="true">
						<f:selectItem itemLabel="Selecione" itemValue="0"/> 
						<f:selectItem itemLabel="Curitiba" itemValue="1"/>
						<f:selectItem itemLabel="São Paulo" itemValue="2"/>
						<f:selectItem itemLabel="Rio de Janeiro" itemValue="3"/>
						<f:selectItem itemLabel="Belo Horizonte" itemValue="4"/>
						</h:selectOneMenu>
					</div>
					
					<legend><p><br></br></p></legend>
						<div class="span3">
						<h:commandButton class="btn btn-primary btn-small search_btn" value="Salvar" action="#{clienteBean.salvar}">
							<f:ajax execute="@form" render="@form"/>
						</h:commandButton>
						</div>
						<div class="span7">
						<h>Ao se cadastrar você concorda com os <a href="termodeuso.xhtml" class="active">termos de uso</a> e a <a href="politicadeprivacidade.xhtml" class="active">política de privacidade</a>.</h>
						</div>
					</ul>
					</fieldset>
				</h:form>
			</div>

	</ui:define>
</ui:composition>